Work around bug in CIFS and vboxsf file systems.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 19 Jan 2013 04:44:34 +0000 (20:44 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 19 Jan 2013 04:44:34 +0000 (20:44 -0800)
commit34e7c23b4be3bcdea8586d10bebf40cae7ebe8c6
tree81e44b650ea0e8cea1cef987d2054737fab6bf32
parent2b8a83cf978ab0bca9d12e2d245edce9549f8faa
Work around bug in CIFS and vboxsf file systems.

The bug was observed on Ubuntu operating inside a virtual machine,
editing files mounted via CIFS or vboxsf from the MS Windows 7 host.
The workaround introduces a race condition on non-buggy hosts,
but it's an unlikely race and anyway there's a nearly identical
nearby race that can't be fixed.
* fileio.c (valid_timestamp_file_system, timestamp_file_system):
New static vars.
(Fwrite_region): Test for file system time stamp bug.
(init_fileio): New function.
* lisp.h (init_fileio): Declare it.
* emacs.c (main): Call it.
src/ChangeLog
src/emacs.c
src/fileio.c
src/lisp.h